package com.xgjweb.fsi.domain;

import com.xgjweb.common.dto.XgjWebDto;

public class Condition {
	private int onePageData = 4;
	private int pageCount = 1;
	private int nowPage = 1;
	private int jumpData = 0;
	private int dataCount=0;
	private String msg;
	private String executeFlag;

	public String getExecuteFlag() {
		return executeFlag;
	}

	public String getMsg() {
		return msg;
	}

	/**
	 * 设置成功信息
	 * 
	 * @param executeFlag
	 * @param msg
	 */
	public void setSuccessMsg(String msg) {
		this.msg = "success";
		this.executeFlag = executeFlag;
	}

	/**
	 * 设置错误信息
	 * 
	 * @param executeFlag
	 * @param msg
	 */
	public void setErrorMsg(String msg) {
		this.msg = "error";
		this.executeFlag = executeFlag;
	}

	public int getOnePageData() {
		return onePageData;
	}

	public void setOnePageData(int onePageData) {
		this.onePageData = onePageData;
	}

	public int getPageCount() {
		return (getDataCount()+onePageData-1)/onePageData;
	}

	public int getNowPage() {
		return nowPage;
	}

	public void setNowPage(int nowPage) {
		this.nowPage = nowPage;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public void setExecuteFlag(String executeFlag) {
		this.executeFlag = executeFlag;
	}

	public int getJumpData() {
		return (nowPage-1 )*onePageData;
	}

	public int getDataCount() {
		return dataCount;
	}

	public void setDataCount(int dataCount) {
		this.dataCount = dataCount;
	}

	public void setPageCount(int pageCount) {
		this.pageCount = pageCount;
	}

	public void setJumpData(int jumpData) {
		this.jumpData = jumpData;
	}

}
